This time I want to ask you for help with a particular script… Some time ago a friend of mine gave me the model of some “wings” that worked with a script that allowed to configure the wings to a specific user, that is to say I put the “nameuser” and that user appeared with the wings on, well this time I tried to do the same but with another model of wings, I dragged the script as it was in the original model, and it didn’t work, I would like to ask for help to see if you know how I could make it work.
if script.Parent.Parent.Name == "you user" then --put your name here
elseif script.Parent.Parent.Name == "othername" then --if you have friends / admins put there names there
else
script.Parent:Destroy()
end
--HI
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
local Whitelisted = {
"UserHere1",
"UserHere2"
} -- All whitelisted players that are allowed to use the wings above ^^
Players.PlayerAdded:Connect(function(plr)
local char = plr.Character
local Wings = RS.Wings
if table.find(Whitelisted, plr.Name) then
local newWings = Wings:Clone()
newWings.Parent = char
end
end)
Oh, I forgot to mention the script is supposed to be in SSS (serverscriptservice), and the Wings accessory is supposed to be in RS (replicatedstorage).
u left the unfilled out script. u left the template script your friend provided you. unfortunately, the problem most likely lies in the details u have filled out; probably not anything script core-processing related (i didn’t fully examine the script but i’m judging from the responses here). if ur comfortable, do u want to share the version you filled out so i can help you from the best of my ability? else i’m afraid there is not much i can do
but if you want me to try, then there might be smth wrong with the usernames you inserted or the way you did it.
also, you could try something simpler like this:
task.delay(2, function()
if not script.Parent.Parent.Name == "urUsername" or not script.Parent.Parent.Name == "friend username" or not script.Parent.Parent.Name == "another friend username" then
script.Parent:Destroy()
end
end)
i used task.delay(2, function()... just so it can wait for everything to load before running it. remember to not replace the whole entire string including the quotation marks when changing usernames, but rather change the text inside the quotation marks.
if this still doesnt work pls make sure that the paths are correct and also it might have smth to do with the wings model itself.