Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

FE problem with TextButtons?

Hey, guys I am having some issues with FilteringEnabled I am using a ServerScript one inside of data storage and one inside of the TextButtons however, the FilteringEnabled is still not letting it work here is my script inside of the TextButton:

script.Parent.MouseButton1Click:connect(function()
	local plr = script.Parent.Parent.Parent.Parent.Parent
    local char = plr.Character
    local stats = plr:WaitForChild("Stats")
    local defense = stats:WaitForChild("Defense")
	defense.Value = defense.Value + 50
	local message = Instance.new("Hint")
	message.Text = char.Name.."'s Defense is: "..defense.Value
    message.Parent = workspace
    wait(5)
    message:remove()
end)

If you guys need my ServerScript inside of ServerScriptService please tell me in the comment below because that's the script that is using Data Storage and all that.... However the problem is that nothing happens when I click on the Gui so I am thinking I did something wrong here on this script!

Thank you and I hope someone can answer this question!

~~ KingLoneCat

1 comment

1

all scripts on the client side should be in local scripts. also get plr from >game.Players.LocalPlayer

1 answer

✓ Accepted answer

Ok, well I figured the issue out. Use localScripts. Also, use debris service. And another thing, use on big script for all the junk. Also, just.... Read the comment.

Also, you will need a remote event to change the stats and stuff.

3 comments

0

Alright, so how would I use remote events for this because I am not going to call it by a Server Script rather I am just making the function run on the event that happens inside... So maybe Remote Functions?

0

Why functions? You need to fire the server in a localScript. Why in the world would you need a remote function?

0

xD I have no idea I just knew that Remote Events wouldn't work out since I'd have to fire them through normal Scripts... that are not client-sided....

This discussion is preserved as it was. New answers, comments, and votes are closed.