i am a beginner in scripting so the script that i showed you was it okay or ?
That script looks fine, you want to add a check right?
So in the if (p.Character) then statement add on after the (p.Character)
and p.Multipliers > 100
100 is the minimum number of multipliers
and then p.Multipliers change that to where the value of the multipliers are on the player.
Close, make that line
if (p.Character) and p.Multipliers > 100 then
Yeah that should work, assuming the player has an IntValue called Multipliers.
Oh actually
p.Multipliers.Value
oke lets test it out if it works
For everyone’s sanity, please just copy and paste your code into here but surround it with ``` . Screenshots are hard to analyze and fix properly.
it isnt working it doesnt teleport anymore
Oh, ok thanks for the help. (30 characters)
-- Currency Leaderstats Example
local function playerAdded(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins = Instance.new("IntValue", leaderstats)
coins.Name = "Coins"
coins.Value = 0
end
game.Players.PlayerAdded:Connect(playerAdded)
local touchPart = script.Parent
--You need a leaderstats for the currency and for this script to work properly...
touchPart.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
local currency = player.leaderstats.coins
if currency >= 100 then
print("Yay, enough coins!")
--do whatever if player has more than or equal to 100 coins(optional
else
print("Player doesn't have enough coins")
--If not then do what ever here..
end
end)
The touch script is imagined to be a child of the part you are to touch so you can change that from the touchPart variable and add your desired location of your part(workspace)
You can learn scripting from youtube videos, developer hub, practicing yourself. The resources are endless. It depends upon the user how it utilizes the resources
Look at what Dev_0V posted. You need to change p.Multiplier to wherever the multipliers are.
So if the multipliers are in the player leaderstats you do
p.leaderstats.Multipliers.Value
i have 2 names of currency that are the same Multi and multipliers witch one do i need to take or do i need them both
Having two identical currency with the same parent isn’t really good so change that up…
The script will not know which one to change for and might just change it for both or non
yea but i dont know how to fix that i olso have a sort of glitch every currency i made has 1 so 1 money 1 multi 1 ultra
Do you have multiple folders, because you only need 1…?
You can add all those currencies in that 1 folder…
All you need to do is use an if statement like the script I recently posted and choose an amount you would like…
If you want to do it for all currencies and not each one different then get all children from the leaderstats folder and again use an if statement…
what u just sayed is so hard to understand